<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content= "<?php echo $keywords; ?>" />
<?php } ?>
<meta http-equiv="X-UA-Compatible" content="IE=edge">

      <?php if ($signPackage) { ?>
      <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
      <script>
        /*
         * 注意：
         * 1. 所有的JS接口只能在公众号绑定的域名下调用，公众号开发者需要先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”。
         * 2. 如果发现在 Android 不能分享自定义内容，请到官网下载最新的包覆盖安装，Android 自定义分享接口需升级至 6.0.2.58 版本及以上。
         * 3. 常见问题及完整 JS-SDK 文档地址：http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html
         *
         * 开发中遇到问题详见文档“附录5-常见错误及解决办法”解决，如仍未能解决可通过以下渠道反馈：
         * 邮箱地址：weixin-open@qq.com
         * 邮件主题：【微信JS-SDK反馈】具体问题
         * 邮件内容说明：用简明的语言描述问题所在，并交代清楚遇到该问题的场景，可附上截屏图片，微信团队会尽快处理你的反馈。
         */
        wx.config({
          debug: false,
          appId: '<?php echo $signPackage["appId"];?>',
          timestamp: <?php echo $signPackage["timestamp"];?>,
          nonceStr: '<?php echo $signPackage["nonceStr"];?>',
          signature: '<?php echo $signPackage["signature"];?>',
          jsApiList: [
            // 所有要调用的 API 都要加到这个列表中
            'onMenuShareTimeline',
            'onMenuShareAppMessage'
          ]
        });
      </script>
      <?php } ?>
      
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<script src="catalog/view/javascript/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<?php foreach ($styles as $style) { ?>
<link href="<?php echo $style['href']; ?>" type="text/css" rel="<?php echo $style['rel']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script src="catalog/view/theme/gd_mobile/javascript/common.js" type="text/javascript"></script>
<?php foreach ($scripts as $script) { ?>
<script src="<?php echo $script; ?>" type="text/javascript"></script>
<?php } ?>
<?php foreach ($analytics as $analytic) { ?>
<?php echo $analytic; ?>
<?php } ?>
</head>
<body class="<?php echo $class; ?>">
<a href="#page-top" class="go-top"><i class="iconfont icon-iconfontshangsheng"></i></a>
<a href="<?php echo $home;?>" class="go-home"><i class="iconfont icon-31shouyexuanzhong"></i></a>
<?php if(strpos($class, '-product-')) { //bottom nav, for product page ?>
<nav id="bottom-add-to-cart">
  <div class="menu-item menu-wishlist"><button id="button-add-to-wishlist"><i class="fa fa-heart <?php echo $in_wishlist ? 'active' : ''; ?>"></i></button></div>
  <div class="menu-item menu-cart"><a href="<?php echo $shopping_cart; ?>"><i class="iconfont icon-iconfontgouwuche"><span class="cart-total" style="<?php echo $cart_count <=0 ? 'display:none;' : ''; ?>"></span></i></a></div>
  <div class="menu-item menu-add-to-cart"><button data-loading-text="<?php echo $text_please_wait; ?>" class="button-add-to-cart"><?php echo $text_add_to_cart;?></button></div>
  <div class="menu-item menu-buy-now"><button data-loading-text="<?php echo $text_please_wait; ?>" class="button-buy-now"><?php echo $text_buy_now;?></button></div>
</nav>
<?php } elseif(strpos($class, '-cart') && $cart_count > 0) {  //bottom nav, for checkout page ?>
<nav id="bottom-checkout">
  <?php if (isOCPro()): ?>
  <div class="cart-select-group">
    <div class="cart-select">
      <input type="checkbox" value="" id="checkbox-all" onclick="$('input[name*=\'selected\']').prop('checked', this.checked); cart_select();" style="visibility: hidden"/>
      <label for="checkbox-all"></label>
    </div>
    <span><?php echo $text_select_all ?></span>
  </div>
  <?php endif ?>
  <div class="total-group">
    <span class="total-price"><?php echo $text_to_pay; ?><strong class="number">--</strong></span>
  </div>
  <div class="checkout-group"><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
</nav>
<?php } else {  //bottom nav, for other pages ?>
<nav id="bottom-tab-menu">
  <div class="menu-item"><a href="<?php echo $home; ?>"<?php echo strpos($class, '-home') ? 'class=" active"' : ''; ?>><i class="iconfont icon-shouye-copy"></i> <div class="name"><?php echo $text_home; ?></div></a></div>
  <div class="menu-item"><a href="<?php echo $link_search; ?>"<?php echo strpos($class, '-search') ? 'class=" active"' : ''; ?>><i class="iconfont icon-search"></i> <div class="name"><?php echo $text_search; ?></div></a></div>
  <div class="menu-item"><a href="<?php echo $link_category; ?>"<?php echo strpos($class, '-category') ? 'class=" active"' : ''; ?>><i class="iconfont icon-31leimu"></i> <div class="name"><?php echo $text_category; ?></div></a></div>
  <div class="menu-item"><a href="<?php echo $shopping_cart; ?>"><i class="iconfont icon-iconfontgouwuche"><span class="cart-total" style="<?php echo $cart_count <= 0 ? 'display:none;' : ''; ?>"></span></i><div class="name"><?php echo $text_cart; ?></div>
  </a></div>
  <div class="menu-item"><a href="<?php echo $account; ?>"<?php echo strpos($class, '-account') ? 'class=" active"' : ''; ?>><i class="iconfont icon-iconfont31wode"></i> <div class="name"><?php echo $text_account; ?></div> </a></div>
</nav>
<?php } ?>
